<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arrs = ['a','b','c','d','e'];
        //传统for循环
        let len = arrs.length;
        for(var i = 1;i<len;i++){
            console.log(arrs[i]);
        }
        //for..in
        for(index in arrs){
            console.log(arrs[index]);
        }
        //for..of
        for(item of arrs){
            console.log(item);
        }
        //forEach
        arrs.forEach((item,index)=>{
            console.log(item,index);
        })
    </script>
</body>
</html>